Skip to content

[cupertino_http] Regenerate bindings with ffigen 21 - #1975

Open
stwime wants to merge 1 commit into
dart-lang:masterfrom
stwime:cupertino-http-ffigen-21
Open

[cupertino_http] Regenerate bindings with ffigen 21#1975
stwime wants to merge 1 commit into
dart-lang:masterfrom
stwime:cupertino-http-ffigen-21

Conversation

@stwime

@stwime stwime commented Aug 14, 2026

Copy link
Copy Markdown

Requests that were still in flight when their isolate shut down could abort the process from a URLSession delegate callback, because the generated listener blocks invoked the Dart callback directly.

ffigen 21.0.0 routes those callbacks through DOBJC_invokeListenerPortBlock, so bumped ffigen and the objective_c runtime it needs, and regenerated.

Fixes #1894


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

Note: The Dart team is trialing Gemini Code Assist. Don't take its comments as final Dart team feedback. Use the suggestions if they're helpful; otherwise, wait for a human reviewer.

@github-actions github-actions Bot added the package:cupertino_http Issues related to package:cupertino_http label Aug 14, 2026
Requests that were still in flight when their isolate shut down could abort
the process from a URLSession delegate callback, because the generated
listener blocks invoked the Dart callback directly.

ffigen 21.0.0 routes those callbacks through
`DOBJC_invokeListenerPortBlock`, so bump `ffigen` and the `objective_c`
runtime it needs, and regenerate.
@stwime
stwime force-pushed the cupertino-http-ffigen-21 branch from 37a3ff7 to c620511 Compare August 14, 2026 07:19
dangthaison91 pushed a commit to dangthaison91/http-dart that referenced this pull request Aug 15, 2026
Generated Objective-C listener blocks invoked Dart FFI callbacks
directly. If a URLSession delegate callback arrived after the owning
isolate shut down, the Dart VM aborted with "Callback invoked after
it has been deleted."

Bump objective_c to 9.5.0 and ffigen to 21.0.0, then regenerate the
bindings so listener blocks dispatch through
DOBJC_invokeListenerPortBlock, which safely drops callbacks whose
receive port no longer exists. Add the upstream isolate-shutdown
regression test from dart-lang#1975.

Refs: dart-lang#1975
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:cupertino_http Issues related to package:cupertino_http

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cupertino_http 2.4.0 crashes on iOS on wrapListenerBlock

1 participant